package org.jeecg.modules.procurement.mapper;

import java.util.List;
import org.jeecg.modules.procurement.entity.BussMaterialProcurementPlanDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.procurement.vo.BussMaterialProcurementPlanDetailPage;

/**
 * @Description: 原料采购计划单明细
 * @Author: jeecg-boot
 * @Date:   2024-06-06
 * @Version: V1.0
 */
public interface BussMaterialProcurementPlanDetailMapper extends BaseMapper<BussMaterialProcurementPlanDetail> {

	/**
	 * 通过主表id删除子表数据
	 *
	 * @param mainId 主表id
	 * @return boolean
	 */
	public boolean deleteByMainId(@Param("mainId") String mainId);

  /**
   * 通过主表id查询子表数据
   *
   * @param mainId 主表id
   * @return List<BussMaterialProcurementPlanDetail>
   */
	public List<BussMaterialProcurementPlanDetailPage> selectByMainId(@Param("mainId") String mainId);

	public List<BussMaterialProcurementPlanDetailPage> selectByApplicationId(@Param("id") String id);

	public List<BussMaterialProcurementPlanDetailPage> selectByApplicationDetailId(@Param("idArray") String[] idArray);

	public List<BussMaterialProcurementPlanDetailPage> selectDetailNum(@Param("id") String id);

	public List<BussMaterialProcurementPlanDetailPage> selectProcurementDetailNum(@Param("planId") String planId,@Param("id") String id);
}
